#include "copysettingdialog.h"
#include "ui_copysettingdialog.h"

CopySettingDialog::CopySettingDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CopySettingDialog)
{
    ui->setupUi(this);

    this->setWindowFlags(Qt::FramelessWindowHint);    //无边框
    this->setStyleSheet("outline: none;");            //无虚线框
}

CopySettingDialog::~CopySettingDialog()
{
    delete ui;
}

void CopySettingDialog::on_sureBtn_clicked()
{
    newName = ui->hmi1_lineEdit->text()+".txt";
    emit copyFile(beforeName,newName);
}

void CopySettingDialog::on_cancelBtn_clicked()
{
    this->hide();
}

void CopySettingDialog::msgReturn(QString msg)
{
    ui->label_2->setText(msg);//消息提示
}

void CopySettingDialog::initView()
{
    ui->label_2->setText("");//消息提示
    ui->hmi1_lineEdit->setText("");//清空
}

void CopySettingDialog::changeLanguage()
{
    ui->retranslateUi(this);
}
